# The new config inherits a base config to highlight the necessary modification
_base_ = '/model/fpn-mm/configs/faster_rcnn/faster_rcnn_r101_fpn_2x_coco.py'

# We also need to change the num_classes in head to match the dataset's annotation
model = dict(
    roi_head=dict(
        bbox_head=dict(num_classes=1)))

# Modify dataset related settings
dataset_type = 'COCODataset'
classes = ('w',)
data = dict(
    train=dict(
        img_prefix='/model/fpn-mm/muozhe/train/',
        classes=classes,
        ann_file='/model/fpn-mm/muozhe/train/annotation_coco.json'),
    val=dict(
        img_prefix='/model/fpn-mm/muozhe/val/',
        classes=classes,
        ann_file='/model/fpn-mm/muozhe/val/annotation_coco.json'),
    test=dict(
        img_prefix='/model/fpn-mm/muozhe/val/',
        classes=classes,
        ann_file='/model/fpn-mm/muozhe/val/annotation_coco.json'))

# We can use the pre-trained Mask RCNN model to obtain higher performance
# https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r101_fpn_2x_coco/faster_rcnn_r101_fpn_2x_coco_bbox_mAP-0.398_20200504_210455-1d2dac9c.pth
load_from = '/model/fpn-mm/checkpoints/faster_rcnn_r101_fpn_2x_coco_bbox_mAP-0.398_20200504_210455-1d2dac9c.pth'